layui.define(function(exports) {
	$(".inpFile").change(function(){
		var path=$(".inpFile").val();
		$(".file").html(path).css("background","url('/ceca_two/img/upload_file.png')no-repeat 10px 10px #f7f7f7");
		$("#delete").css("display","block").click(function(){
			$(".file").html("我要上传文件").css("background","url('/ceca_two/img/link_file.png')no-repeat 10px 10px #f7f7f7");
			$("#delete").css("display","none");
			$(".fileJpg").css("display","block");
		})
		$(".fileJpg").css("display","none");
	});
	$(".selected").click(function(){
		if($(this).children('ul').css("display")=="none"){
			$(this).children('div').css("border","1px solid #ff3030").siblings().show();
			$(this).find('img').css("transform","rotate(180deg)");
			$(this).find('li').click(function(){
				$(this).find('img').css("transform","rotate(0deg)");
				$(this).parent().siblings('div').html($(this).html()+"<img src='/ceca_two/img/shareImg.png' alt='' />");
			});
		}else{
			$(this).children('div').css("border","1px solid #ddd").siblings().hide();
			$(this).find('img').css("transform","");
		}
	});
	exports('myshare', {}); //注意，这里是模块输出的核心，模块名必须和use时的模块名一致
});

